<!--# layout("/common/mallout.html",{"jsBase":"/js/user/userMessage/"}){ -->
<link rel="stylesheet" href="http://ziyunoss.oss-cn-hangzhou.aliyuncs.com/pop/mall/style/member.css">
<link rel="stylesheet" href="/css/order.css">
<script src="http://ziyunoss.oss-cn-hangzhou.aliyuncs.com/pop/mall/style/library.js"></script>
<input type="hidden" id="messageId" name="messageId" value="${messageId}"> 
<body>
    <div class="h_message">
        <div class="h_message_center">
            <div class="h_top">
            </div>
            <div class="h_content">
            </div>
            <div class="h_confirm">
                <a href="javascript:;" class="h_del">删除消息</a>
                <a href="javascript:;" class="h_back">返回</a>
            </div>
        </div>
    </div>
</body>
<!--#} -->
<script >
   var messageId=$("#messageId").val();
   doAjax('/user/userMessage/getUserMessageByMessageId.json','post',{"messageId":messageId},function(res){
	   $(".h_content").empty();
	   $(".h_top").empty();
	   if(res.code=='200'){
		   var userMessage=res.data;
		   var topHtml=' <p><span>站内消息</span>>'+userMessage.title+'</p>';
		   var contentHtml='<span>'+userMessage.comment+'</span>';
	   $(".h_top").append(topHtml);
	   $(".h_content").append(contentHtml);
	   }
   });
   
   $(document).on('click','.h_del',function(){
	   $.confirm('友情提示', '确定删除消息', function () {
		   doAjax('/user/userMessage/delMessage.json','post',{"messageIds":messageId},function(res){
			   if(res.code=='200'){
				   location.href = "/user/userMessage/index.do";
			   }
		   })
	   })
		
	 });
   $(document).on('click','.h_back',function(){
	   location.href = "/user/userMessage/index.do";
	 });
</script>
<style>
* {
    margin: 0;
    padding: 0;
}
.h_message {
    width: 100%;
    height: 620px;
    background-color: #f4f4f4;
}
.h_message_center {
    width: 1200px;
    height: 620px;
    margin: auto;
}
.h_top {
    width: 1200px;
    height: 70px;
}
.h_top p {
    margin: 0;
    padding: 0;
    line-height: 70px;
}
.h_top p span {
    font-size: 20px;
}
.h_content {
    width: 1200px;
    height: 160px;
    background-color: #fff;
}
.h_content{
    padding: 50px 80px;
    box-sizing: border-box;
}
.h_confirm {
    width: 340px;
    height: 55px;
    margin: 25px auto;
}
.h_del {
    width: 140px;
    height: 55px;
    line-height: 55px;
    background-color: #6747B2;
    float: left;
    text-decoration: none;
    text-align: center;
    color: #fff;
}
.h_back {
    width: 140px;
    height: 55px;
    line-height: 55px;
    text-align: center;
    float: right;
    border: 1px solid #6747B2;
    color: #6747B2;
    box-sizing: border-box;
    text-decoration: none;
}
</style>


